// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:24

// Source File Name:   rn.java

package com.zelix;

import java.util.*;

//            qm, hn, kn, mn,
//            ux, wn, du

public final class rn {

    private qm a;
    private ArrayList b;

    public rn(qm qm1) {
        a = qm1;
        b = new ArrayList(qm1.d().size());
    }

    public void a(HashSet hashset) {
        b.add(hashset);
    }

    public HashSet a(int i) {
        return (HashSet) b.get(i);
    }

    HashSet b(int i) {
        return (HashSet) b.get(i);
    }

    public boolean a() {
        Iterator iterator;
        if (b.size() < a.d().size() + (a.a() ? 1 : 0))
            return false;
        iterator = b.iterator();
        while (iterator.hasNext()) {
            Iterator iterator1;
            HashSet hashset = (HashSet) iterator.next();
            HashSet hashset1 = hashset;
            iterator1 = hashset.iterator();
            while (iterator1.hasNext()) {
                kn kn1 = (kn) iterator1.next();
                if (!kn1.f())
                    return false;
            }
        }
        return true;
    }

    public void a(HashMap hashmap, ux ux1, du du) {
        Iterator iterator;
        ArrayList arraylist = (ArrayList) b.clone();
        iterator = arraylist.iterator();
        while (iterator.hasNext()) {
            HashSet hashset;
            Iterator iterator1;
            hashset = (HashSet) iterator.next();
            HashSet hashset1 = (HashSet) hashset.clone();
            iterator1 = hashset1.iterator();
            while (iterator1.hasNext()) {
                kn kn1 = (kn) iterator1.next();
                if (!kn1.e())
                    continue; /* Loop/switch isn't completed */
                if (kn1 instanceof hn) {
                    hn hn1 = (hn) kn1;
                    hn1.a(hashmap, ux1, du);
                } else if (kn1 instanceof mn) {
                    mn mn1 = (mn) kn1;
                    if (mn1.g() == du) {
                        rn rn1 = (rn) hashmap.get(ux1.a(kn1.c()));
                        if (rn1 != null) {
                            HashSet hashset2 = (HashSet) rn1.b.get(0);
                            hashset.remove(kn1);
                            hashset.addAll(hashset2);
                        }
                    }
                }
            }
        }
    }

    public int b() {
        return b.size();
    }
}